ButtonClick
By Adam Wehmann

Version 4.00
Last Modified: 12/31/1
Copyright © 2001-2002

http://www.chicanerous.com/


Setup

To use this script first change the first line in click.pl to your server's path to Perl. Then create a new directory on your server and CHMod it to 777. (world-rewritable) Next, upload click.pl to the directory you just created and CHMod it to 777. Open your favorite web browser and navigate to click.pl. The address should look something like: http://www.yourdomain.com/cgi-bin/click.pl

A password prompt should show up the first time you run the script. Enter the password you want to use to reset, delete, and add IDs. You are now ready to use the script.


Use

To View Stats:
The public address for people to view the amount of clicks on each ID is:
http://www.yourdomain.com/cgi-bin/click.pl

To Add an ID:
Go to the public address and scroll down till you see the box below and to the left of the stats. Enter your password in the box and click the 'admin' button. The window should change to the stat editor screen. Scroll down to the bottom and look for three boxes in a row: 'name', 'http://', and '0'. Enter the new ID's name in the 'name' box, the URL you want it to redirect to in the 'http://' box, and the starting count in the '0' box. Click 'new' to add the ID to your list. Use the URL from the 'BClick URL' column to count the clicks on that ID.

To Reset an ID:
Go to the public address and scroll down till you see the box below and to the left of the stats. Enter your password in the box and click the 'admin' button. The window should change to the stat editor screen. Scroll down to the ID your want to reset. Click the 'reset' button at the end of the row.

To Delete an ID:
Go to the public address and scroll down till you see the box below and to the left of the stats. Enter your password in the box and click the 'admin' button. The window should change to the stat editor screen. Scroll down to the ID you want to delete. Click the 'delete' button at the end of the row. Then open your favorite FTP program and delete the .xxx file that is named the same as the ID was.


FAQ

Is 4.x compatible with 3.x and below?
No it is not. You must copy down your IDs, URLs, and counts then enter them into 4.x. I'm sorry for this inconvenience but the script was totally rewritten so that you could have a much easier to set up and maintain script.

Will the old 3.x URL to view stats still work?
Yes the old 'click.pl?type=stat' URL will still work.

Can't people steal my password by downloading the 'pass.txt' file off of my server?
No. Your password is encrypted with a one-way algorithm.

What if I lose my password or want to change it?
Delete the 'pass.txt' file off your server and run the script to enter a new password. The 'pass.txt' file will be located in the same directory as the script.

Why doesn't my new ID show up when I add it?
1 The 'name' box can't contain nothing or just the word 'name' and the 'http://' box can't contain nothing or just the letters 'http://'. 2 The script needs to be in a new directory CHModded to 777.

Why do I have to manually delete the *.xxx file when I delete an ID?
As far as I know the language this script was written in does not have the file delete capability. If you know otherwise please email me.

What are those extra variables in the script for?
The $file_list, $file_pass, and $file_extension variables are there for people using multiple instances of the script in the same directory. You can change those so other scripts you are running do not overwrite this instance's settings or vice-versa.

What should I do if I get a 'configure $path variable' error?
If the script gives you an error that looks like 'Please configure the $path variable because the script was not able to locate itself' then open up 'click.pl' and type the path to the script in the $path variable.


Bug Report

Make sure you have the latest version of this script installed. You can check for it at chicanerous.com. Before reporting a bug thoroughly read this ReadMe and make sure there is not a solution for your problem. If you can't find a solution then email me with a thorough description of what you did before the problem happened, what the problem is, your script version, and any extra error information you can give me. The more information the better.